package com.hotchpotch.adapter;


import android.content.Context;
import android.widget.TextView;

import com.hotchpotch.R;
import com.hotchpotch.base.BaseRecyclerAdapter;
import com.hotchpotch.base.BaseViewHolder;
import com.hotchpotch.bean.DBFlowTestBean;

public class DBFlowAdapter2 extends BaseRecyclerAdapter<DBFlowTestBean> {
    private TextView tv1, tv2, tv3, tv4;

    public DBFlowAdapter2(Context context, int layoutId) {
        super(context, layoutId);
    }

    @Override
    public void onBind(BaseViewHolder holder, DBFlowTestBean dbFlowTestBean, int position) {
        tv1 = holder.getView(R.id.item_dbflow_tv1);
        tv2 = holder.getView(R.id.item_dbflow_tv2);
        tv3 = holder.getView(R.id.item_dbflow_tv3);
        tv4 = holder.getView(R.id.item_dbflow_tv4);

        tv1.setText("id = " + dbFlowTestBean.getId());
        tv2.setText("姓名 = " + dbFlowTestBean.getName());
        tv3.setText("性别 = " + dbFlowTestBean.getSex());
        tv4.setText("年龄 = " + dbFlowTestBean.getAge());
    }
}
